package com.pur.zsms.pmsnmanage.user.service;

import java.util.List;

import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.common.support.PageController;
import com.pur.zsms.common.support.PaginationSupport;
import com.pur.zsms.pmsnmanage.menu.po.MenuPo;
import com.pur.zsms.pmsnmanage.role.vo.RoleVo;
import com.pur.zsms.pmsnmanage.user.po.UserLevelPo;
import com.pur.zsms.pmsnmanage.user.po.UserPo;
import com.pur.zsms.pmsnmanage.user.vo.LdAddressVo;
import com.pur.zsms.pmsnmanage.user.vo.UserVo;
import com.pur.zsms.po.SupplierShopUserPo;
import com.pur.zsms.shopmanage.po.ShopPo;
import com.pur.zsms.supplier.vo.SupplierVo;

public interface IUserService {

	String msg = "";

	public String getMsg();

	public void setMsg(String msg);

	/**
	 * 查询用户信息
	 * 
	 * @param
	 * @return
	 */
	public PaginationSupport listUser(PageController pageController, UserVo userVo) throws GenericException;

	public PaginationSupport listUserForSupplierShop(PageController pageController, UserVo userVo) throws GenericException;

	/**
	 * 新增用户信息
	 */
	public boolean addUser(UserVo c, UserPo lg) throws GenericException;

	/**
	 * 新增用户信息 供货商
	 */
	public long addUserForSup(UserVo c) throws GenericException;

	public void addSupplierShopUserPo(SupplierShopUserPo c) throws GenericException;

	public long addUserForSupplier(SupplierVo c, UserPo lg) throws GenericException;

	/**
	 * 修改用户信息
	 */
	public void updateUser(UserVo c) throws GenericException;

	public void updateUserForSupplier(SupplierVo c) throws GenericException;

	/**
	 * 删除用户信息
	 */
	public void deleteUser(String userId) throws GenericException;

	/**
	 * 根据用户ID查询出所有用户信息
	 * 
	 * @return
	 */
	public UserVo listUserByUserId(String userId) throws GenericException;

	/**
	 * 根据用户ID查询出该用户所有用户角色信息,同时没有分配给该用户的角色也查出来
	 * 使用RoleVo的checked字段进行区分，为true代表分配给该用户的角色
	 * 
	 * @param UserId
	 *            用户ID
	 * @return 用户角色信息
	 * @throws GenericException
	 */
	public List<RoleVo> listRoleByUserId(String userId) throws GenericException;

	/**
	 * 根据用户ID更新该用户的用户角色信息
	 * 
	 * @param UserId
	 *            用户ID
	 * @return
	 * @throws GenericException
	 */
	public void updateRoleByUserId(String userId, String[] roles) throws GenericException;

	/**
	 * 根据用户ID删除该用户的用户角色信息
	 * 
	 * @param UserId
	 *            用户ID
	 * @return
	 * @throws GenericException
	 */
	public void deleteUserRoleByUserId(String userId) throws GenericException;

	/**
	 * 根据用户名查找用户
	 */
	public UserPo findUserLogon(String userName, String password) throws GenericException;

	/**
	 * 查询用户所对应菜单
	 * 
	 * @param userId
	 * @return
	 */
	public List<MenuPo> getUserMenuList(String userId) throws GenericException;

	public UserVo getUserVoById(String userId) throws GenericException;

	public UserLevelPo getUserLevelPo(long userId) throws GenericException;

	public List<ShopPo> getUsePoListByUserIdString(String userIdString) throws GenericException;

	public List<UserPo> getUsePoListByOpenId(String openId) throws GenericException;

	public List<RoleVo> listAllRole() throws GenericException;

	public List<RoleVo> listRoleByIdentity(String identity) throws GenericException;

	public String getUserTestValue() throws GenericException;

	public String getUserForShop() throws GenericException;

	public String userForSupplierShop(long supId) throws GenericException;

	public List<UserPo> getUserForSup(long supId) throws GenericException;

	public String getShopForSupplier(int supId) throws GenericException;

	public String getSupType(long supId) throws GenericException;

	public String getShopForAdmin(long userId) throws GenericException;

	public String getShopForManager(long userId) throws GenericException;

	public String shopForAccountant(long userId) throws GenericException;

	public String getUserTestValueForSuppOrder(String orderDate, int supId) throws GenericException;

	public String getUserTestValueForSuppOrderDistribute(String orderDate, int supId) throws GenericException;

	public String getUserLevel(UserVo userVo) throws GenericException;

	public String getUserForSupplierCompany(SupplierVo c) throws GenericException;

	public String getCheckCust(UserVo userVo) throws GenericException;

	public String getPullDownProvince(String space) throws GenericException;

	public String getPullDownCity(int parentid, String space) throws GenericException;

	public String getPullDownCountry(int parentid, String space) throws GenericException;

	public boolean getUserNameForCheck(String userName) throws GenericException;

	public boolean getRealNameForCheck(String userName) throws GenericException;

	public boolean getCheckPhone(String phone) throws GenericException;

}
